Add a precondition to all the element timing tests Since PerformanceObserver.observe doesn't have any way to signal an unsupported type we end up just timing out all the tests in implementations that doesn't support element timing. For efficiency add a precondition to all the tests to check for the relevant API instead.
diff --git a/element-timing/rectangular-image.html b/element-timing/rectangular-image.html index a1af961..0b44c4f 100644 --- a/element-timing/rectangular-image.html +++ b/element-timing/rectangular-image.html
@@ -14,6 +14,9 @@ let beforeRender; let img; async_test(function (t) { + if (!window.PerformanceElementTiming) { + assert_unreached("PerformanceElementTiming is not implemented"); + } const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1);